﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using ConstructionBidOnline.Biz;
using ConstructionBidOnline.Common;

public partial class admin_VideoView : System.Web.UI.Page
{

    #region Constants

    private const string PROP_DATASRC_PAGEVIDEO = "__PAGEVIDEO::PAGEVIDEO";
    private const string PROP_SELECTED_PAGEVIDEO_ID = "__PAGEVIDEO::SPAGEVIDEOID";

    #endregion

    #region Public Properties

    public PageVideoCollection DataSourcePageVideo
    {
        get { return (SessionMgr.Session[PROP_DATASRC_PAGEVIDEO] is PageVideoCollection ? (PageVideoCollection)SessionMgr.Session[PROP_DATASRC_PAGEVIDEO] : (PageVideoCollection)(SessionMgr.Session[PROP_DATASRC_PAGEVIDEO] = new PageVideoCollection())); }
        set { SessionMgr.Session[PROP_DATASRC_PAGEVIDEO] = value; }
    }

    public int SelectedPageVideoID
    {
        get { return (SessionMgr.Session[PROP_SELECTED_PAGEVIDEO_ID] is int ? (int)SessionMgr.Session[PROP_SELECTED_PAGEVIDEO_ID] : 0); }
        set { SessionMgr.Session[PROP_SELECTED_PAGEVIDEO_ID] = value; }
    }


    #endregion

    #region Event Handlers

    #region Page Load

    protected void Page_Load(object sender, EventArgs e)
    {
        DataSourcePageVideo = PageVideo.GetAllPageVideos();
        SelectedPageVideoID = int.Parse(Request.QueryString["videoid"]);
        DataSourcePageVideo.FindByVideoID(SelectedPageVideoID);

        lbltitle.Text = DataSourcePageVideo[0].VideoTitle;
        lbldescription.Text = DataSourcePageVideo[0].VideoDescription;
        lblvideoname.Text = DataSourcePageVideo[0].VideoName;
    }

    #endregion 

    #endregion
}
